<?php
/**
 * Created by PhpStorm.
 * User: fangwei
 * Date: 2019-09-12
 * Time: 22:09
 */

namespace App\Http\Requests\Admin;


use Illuminate\Foundation\Http\FormRequest;

class SupplierInputDTO extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'name' => 'required|max:100',
            'contact' => 'max:50',
            'contact_mobile' => 'max:50',
            'address' => 'max:200',
            'mark' => 'max:200',

        ];
    }

    public function messages()
    {
        return [
            'name.required' => '供应商名称必须',
            'name.max' => '供应商名称过长',
            'contact.max' => '供应商名称过长',
            'contact_mobile.max' => '联系方式',
            'address.max' => '地址信息过长',
            'mark.max' => '备注信息过多',
        ];
    }
}